// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_PERSON_CUSTOMER_HISTORY
// * CreateDate    : 2011/11/21 10:37:36
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/21 10:37:36
// * LastChanger   : 2011/11/21 10:37:36
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class MstPersonCustomerHistoryEntity : EntityBase
    {
        public MstPersonCustomerHistoryTable TableSchema
        {
            get
            {
                return MstPersonCustomerHistoryTable.Current;
            }
		}
		
		public MstPersonCustomerHistoryEntity()
        {

        }
		
		public MstPersonCustomerHistoryEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.HistoryId = Convert.ToString(CommonFunctions.ToObject(dr["HISTORY_ID"]));
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.FromDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FROM_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
        }
		
		public MstPersonCustomerHistoryEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.HistoryId = Convert.ToString(CommonFunctions.ToObject(dr["HISTORY_ID"]));
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.FromDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FROM_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstPersonCustomerHistoryTable.Current;
            }
        }
		
		#region Perporty List
        public string HistoryId
        {
            get { return Convert.ToString(GetData(MstPersonCustomerHistoryTable.C_HISTORY_ID)); }
            set { SetData(MstPersonCustomerHistoryTable.C_HISTORY_ID, value); }
        }
		
        public string PersonId
        {
            get { return Convert.ToString(GetData(MstPersonCustomerHistoryTable.C_PERSON_ID)); }
            set { SetData(MstPersonCustomerHistoryTable.C_PERSON_ID, value); }
        }
		
        public string CustomerId
        {
            get { return Convert.ToString(GetData(MstPersonCustomerHistoryTable.C_CUSTOMER_ID)); }
            set { SetData(MstPersonCustomerHistoryTable.C_CUSTOMER_ID, value); }
        }
		
        public DateTime FromDate
        {
            get { return Convert.ToDateTime(GetData(MstPersonCustomerHistoryTable.C_FROM_DATE)); }
            set { SetData(MstPersonCustomerHistoryTable.C_FROM_DATE, value); }
        }
		
        public DateTime EndDate
        {
            get { return Convert.ToDateTime(GetData(MstPersonCustomerHistoryTable.C_END_DATE)); }
            set { SetData(MstPersonCustomerHistoryTable.C_END_DATE, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(MstPersonCustomerHistoryTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(MstPersonCustomerHistoryTable.C_LAST_MODIFIED_DATE, value); }
        }
		
		#endregion
	}
	
	
}	

